home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / amac34.arc / FILE20.QM < prev    next >
Text File  |  1991-02-16  |  48KB  |  1,069 lines

  1. *                                  (FILE20).QM
  2. *┌───────────────────────── (INDEX) FileManager Macros ────────────────────────┐
  3. *│
  4. *│#(F3_) Spell Check WITH       Backup, QCONFIG.DAT backups ON or OFF   <- new
  5. *│#(F4_) Spell Check WITHOUT    Backup, QCONFIG.DAT backups ON or OFF   <- new
  6. *│#(F5_) SAVE  file  WITHOUT    Backup, QCONFIG.DAT backups ON          <- new
  7. *│#(F6_) SAVE  file  WITHOUT    Backup, QCONFIG.DAT backups ON or OFF   <- new
  8. *│#(F7_) DELETE CurrentFileName Backup                                  <- new
  9. *│#(F8_) EDIT   CurrentFileName Backup                                  <- new
  10. *│
  11. *│@(7)   LOAD all files in "Ring"                                <- key change
  12. *│@(1)   LOAD file from sorted list
  13. *│@(4)   LOAD file from "PickList", wild cards OK
  14. *│@(5)   LOAD file whose name is at the cursor
  15. *│@(6)   re-LOAD current file from disk copy
  16. *│@(3)   DELETE file from sorted list
  17. *│@(9)   EDIT file from "RingList"
  18. *│@(0)   EDIT file from "RingList" if new files have been loaded
  19. *│@(2)   READ macfile & LOAD it's txtfile from sorted list
  20. *│@(8)   READ macfile of txtfile that is loaded
  21. *│@(F7)  READ macfile & LOAD it's txtfile from txtfile list
  22. *│@(F8)  READ macfile from macfile list, txtfile is not loaded
  23. *│
  24. *│@(F1)  SAVE file with name "Mos_Day_Hour_Min.Ext"                    <-change
  25. *│@(F2)  SAVE file with name "CurrentFileName.Mos_Day"
  26. *│@(F3)  SAVE Read-Only files                                          <-change
  27. *│@(F4)  EXECUTE Dos command from List                                 <-change
  28. *│@(F5)  EXECUTE Dos command from List/ with CurrentFileName
  29. *│@(F6)  Turn "DIR" list into a "8.3" list of filenames (T.Farley)     <-change
  30. *│
  31. *│@(f)   Execute programs requiring filename without full path name.
  32. *│@(h)   Select Index item with cursor line, then <enter>.
  33. *│@(q)-  QUIT all files in "Ring"
  34. *│
  35. *│(Index) - How to locate macro or item below from Index using @h
  36. *│(Description)
  37. *│(Startup)
  38. *│(Macros)
  39. *│(Other) Macros
  40. *│(Version) history
  41. *└────────[ be sure to leave at least one blank line at end of Index  ]────────┘
  42.  
  43.  
  44.  
  45. * (Index) Use;
  46. *
  47. * To locate a macro or item in this file, press @h, place the cursor
  48. * line on the desired item in the Index above, and press <enter>.
  49. * See BOOK15.QM for more details.
  50.  
  51.  
  52.  
  53. * (Description):
  54.  
  55. * (FILE20).QM  QEdit macros allow  the user  to select files  from a list
  56. * to: either load  a file, read a  macfile, delete a  file, read a macfile
  57. * of loaded txtfile,  save a read-only  file, or save  files with the name
  58. * either  09141025.EXT or  file NAME.914.  File sorting  is done  using DX
  59. * Directory Extender, not included with these files.  Spell  check  macros
  60. * with ShareSpell.
  61.  
  62. * File sorting is done using DX Directory Extender, v2.11. If the newer
  63. * version 2.60 is used and it is NOT registered, the DX heading will
  64. * show in the file selection window of @1 to @5 and the initial cursor
  65. * line will not be positioned on the first files in the selection list.
  66. * The file selection can be still be made by moving the cursor line to
  67. * the desired file and pressing <enter>. Alternatively, you can either
  68. * register DX or change the macros. I suggest registration. DX is the
  69. * most powerful DOS file and directory manager available.
  70.  
  71. * For (other) macros, see ALLMACRO.INF
  72.  
  73. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  74.  
  75. * (Startup): See also FILE.DOC for requirements.
  76. *
  77. * To BEGIN, just type "START FILE" <Enter>. All pertinent files will be
  78. * loaded in the "Ring" for viewing, and FILE20.MAC is read.
  79. * Alternatively, type "START FILE 0" <Enter> and the disk copies of all
  80. * files in the "Ring" will be loaded ready for editing, saving time.
  81.  
  82.  
  83.  
  84. *(Macros):-------------------
  85. *
  86. *┌──────────────────────────────────────────────────────────────────┐
  87. *│@(1) Selects file to LOAD from sorted list of files in directory  │
  88. *└──────────────────────────────────────────────────────────────────┘
  89. *
  90. @1 Macrobegin
  91.         altwordset                      * For all file names
  92.         EditFile "file.srt" return      * Load sort list
  93.         pause                           * Select sort type
  94.         copy                            * Copy line to scrap
  95.         quit                            * Quit file.srt
  96.         DOS "file-DX "                  * Make/sort file list
  97.         paste return return             *
  98.         EditFile "c:!" return           * Load sorted file list
  99.         cursordown insertline           *
  100.         cursordown                      * Get to first file name line
  101.         pause                           * Pause to select file
  102.         begline wordright               * Put cursor on file name
  103.         markword copy                   * Mark/copy file name
  104.         killfile quit                   * Kill/quit c:!
  105.         EditFile paste return           * Load file
  106.         defaultwordset                  * Reset default
  107. *
  108. * 68 bytes Sun  09-09-1990  14:38:25
  109.  
  110.  
  111.  
  112. *┌─────────────────────────────────────────────────────────────────────┐
  113. *│@(2) LOAD txtfile/READ macfile from sorted list of files in directory│
  114. *└─────────────────────────────────────────────────────────────────────┘
  115. *
  116. @2 Macrobegin
  117.         altwordset                      * For all file names
  118.         DOS "file-DX mac d-"            * Sort macfiles by date
  119.         return return                   *
  120.         EditFile "c:!" return           * Load sorted file list
  121.         cursordown insertline           *
  122.         cursordown                      * Get to first file name line
  123.         pause                           * Pause to select
  124.         begline                         * Re-position cursor if moved
  125.         find "." return return          * Select it and get to dot
  126.         CursorRight delrtword CursorLeft* Delete extension
  127.         markword copy                   * Mark/copy file name - no ext
  128.         killfile quit                   * Kill/quit c:!
  129.         EditFile paste  "qm" return     * Load txtfile
  130.         defaultwordset                  * Reset default
  131.         macroread paste "mac" return    * Read macfile
  132. *
  133. * 78 bytes Sun  09-09-1990  14:38:29
  134.  
  135.  
  136.  
  137. *┌──────────────────────────────────────────────────────────────────┐
  138. *│@(3) Selects file to DELETE from sorted list of files in directory│
  139. *└──────────────────────────────────────────────────────────────────┘
  140. *
  141. * Be careful to select ONLY the file you want deleted.
  142. *
  143. @3 Macrobegin
  144.         altwordset                      * For all file names
  145.         EditFile "file.srt" return      * Load sort list
  146.         pause                           * Pause to select sort
  147.         markline copy paste             * Paste selected line
  148.         begline markword                * Mark file ext
  149.         quit                            * Quit file.srt
  150.         DOS "file-DX "                  * Make/sort file list
  151.         paste return return             *
  152.         EditFile "c:!" return           * Load sorted file list
  153.         cursordown insertline           *
  154.         cursordown                      * Get to first file name line
  155.         pause                           * Pause to select file
  156.         begline wordright               * Put cursor on file name
  157.         markword copy                   * Select it
  158.         insertline                      * Insert line in c:!
  159.         paste                           * Paste file name
  160.         copy                            * Copy file name to scrap
  161.         DOS "del " paste return return  * Delete select file
  162.         killfile quit                   * Kill/quit c:!
  163.         defaultwordset                  * Reset default
  164. *
  165. * 84 bytes Sun  09-09-1990  14:38:34
  166.  
  167.  
  168.  
  169.  
  170. *┌─────────────────────────────┐
  171. *│@(4) Load Files From PickList│
  172. *└─────────────────────────────┘
  173. *
  174. * To run, just press Alt and 4 at the same time. At the prompt "File=",
  175. * enter a [file name(s)] and [file sort option] to make a PickList
  176. * using the following syntax:
  177. *
  178. *         [file name(s)]  [file sort option]  <enter>
  179. *
  180. * where [file sort option] is either "esda".
  181. *
  182. * For example, when entering:
  183. *
  184. *         c*.* s- (space must be included between name/sort option!)
  185. *
  186. * a file to load can be selected from a PickList of all files in
  187. * the current directory beginning with the letter "c" sorted by size,
  188. * largest first. Entering file name(s) WITHOUT a sort option, makes
  189. * a PickList sorted by name an then extension.
  190. *
  191. * This macro can sort files in any order. The following information is
  192. * from the file DX.DOC for Directory Extender. Please read this
  193. * document for more information on using the excellent program DX.
  194. *
  195. * Sorting is by name by default. The /SOrt switch without a value sorts
  196. * by name  and then extension in ascending  order. The sorting
  197. * criteria consists of: "N" for name, "E" for extension, "S" for  size,
  198. * "D" for date/time, "A" for attribute. Specifying  a letter by itself
  199. * or with a '+' suffix indicates ascending  order;  specifying a '-'
  200. * suffix indicates descending order.
  201. *
  202. * Examples of the sort options are:
  203. *
  204. *     [filename(s)] ne         => sort by name and extension
  205. *
  206. *     [filename(s)] e-n-       => sort files descending by
  207. *                                 extension first and then by
  208. *                                 descending name
  209. *
  210. *     [filename(s)] snd-       => sort files by ascending size,
  211. *                                 ascending name, and then
  212. *                                 descending date
  213. *
  214. @4 Macrobegin
  215.         unmarkblock altwordset          * For all file names
  216.         begline insertline              * Insert temp line
  217.        "File="                          *
  218.         endline markcolumn              * Start mark
  219.         pause                           * File name?, wild cards OK
  220.         markcolumn copy                 * Mark/copy file name to scrap
  221.         delline                         * Delete temp line
  222.         DOS "PICK " paste               * Make PickList
  223.         return return                   *
  224.         EditFile "c:!" return           * Load list
  225.         cursordown insertline           *
  226.         cursordown                      * Get to first file name line
  227.         pause                           * Pause to select file
  228.         begline wordright               * Put cursor on file name
  229.         markword copy                   * Mark/copy selection to scrap
  230.         killfile quit                   * Kill/quit c:!
  231.         EditFile paste return           * Load file selected
  232.         defaultwordset                  * Reset default
  233. *
  234. * 60 bytes Sun  09-09-1990  14:38:38
  235.  
  236.  
  237.  
  238.  
  239.  
  240. * ┌──────────────────────────────────────────────┐
  241. * │@(5)  LOADS a file whose name is at the cursor│
  242. * └──────────────────────────────────────────────┘
  243. * This picks up a file name that is sitting at the cursor position in the
  244. * editor, and loads it into another buffer (From SemWare BBS).
  245. *
  246. @5      Macrobegin                      *
  247.         altwordset                      * For all file names
  248.         markword                        * Mark file name
  249.         copy                            * Copy to scrap
  250.         EditFile                        * Load it
  251.         paste return                    *
  252.         defaultwordset                  *
  253. *
  254. * 11 bytes Sun  09-09-1990  14:38:43
  255.  
  256.  
  257.  
  258.  
  259. * ┌───────────────────────────────────────┐
  260. * │@(6) Reloads current file from disk    │
  261. * └───────────────────────────────────────┘
  262. *
  263. @6 Macrobegin
  264.    SplitLine EditFile CurrentFileName Return NewFile "N" Return
  265. *
  266. * 12 bytes Fri  08-10-1990  15:24:13
  267.  
  268.  
  269.  
  270.  
  271. * ┌────────────────────────────────────────────────────────┐
  272. * │@(7) Load all files in "Ring"                           │
  273. * └────────────────────────────────────────────────────────┘
  274. *
  275. * This macro is handy if you want to quickly load all files in the
  276. * ring. QEdit has the advantage that the EditFile, just like the QEdit
  277. * command line, can accept multiple file names together, separated by
  278. * spaces. Wild card file specification is also possible. The end result
  279. * is that files can be entered in QEdit's "ring" *without* actually
  280. * loading.  Qedit defers loading files in the ring until you either
  281. * EditFile or nextfiles into the file. This macro simply automatically
  282. * "loads" all files in the "Ring" by NextFiling through all files. If
  283. * your hard drive is slow (like mine), you'll appreciate the time
  284. * this macro saves. Run this macro twice to see the difference.
  285.  
  286. * If a file is set "read-only", press <Esc>, and run the macro until
  287. * all files are loaded. The technique using the NUL file as a place
  288. * marker was written by Kyle Watkins of SemWare and is used here with a
  289. * slight modification.
  290. *
  291. * See also QLSTxx.QM for using this macro to load files from a
  292. * FileList.
  293. *
  294. @7      Macrobegin
  295.         EditFile '!' Return      * Insert -or- GoTo NUL File
  296.         Begline CursorRight      * Put cursor in Col. 2 of NUL File
  297.         LOOP:                    * Main test loop
  298.             Nextfile             * Move to next files in Ring
  299.             CursorLeft           * Move cursor left (need for NUL test)
  300.             Jfalse LOOP:         * If couldn't move to left, it's not
  301.                                  * the NUL File AND cursor position
  302.                                  * has not changed -- LOOP again
  303.                                  *ELSE
  304.                                  * Check to see if in the NUL File
  305.             CursorLeft           * Move cursor left for NUL Test
  306.             Jfalse END:          * If couldn't move left -- We
  307.                                  * ARE in the NUL File and Need
  308.                                  * to END the Macro
  309.                                  *ELSE
  310.             CursorRight          * Move back to Col. 2 in NUL File
  311.         END:                     * Macro is DONE
  312.             Quit                 * Quit the NUL File
  313. *
  314. * 21 bytes Tue  10-30-1990  20:05:53
  315.  
  316.  
  317.  
  318.  
  319. *┌─────────────────────────────────────────────┐
  320. *│@(8) Reads macfile of txtfile that is loaded │
  321. *└─────────────────────────────────────────────┘
  322. *
  323. * From MACR27.QM
  324. *
  325. @8 Macrobegin
  326.    macroread CurrentFileName backspace backspace "mac" return
  327. *
  328. * 15 bytes Sun  09-09-1990  14:38:55
  329.  
  330.  
  331.  
  332.  
  333. * ┌────────────────────────────────────────────────────────────────────┐
  334. * │@(9) Make RingList, Load all files in ring, select file to edit     │
  335. * └────────────────────────────────────────────────────────────────────┘
  336. *
  337. * Does not make NEW RingList if already made.
  338.  
  339. * Both @9 and @0 have the disadvantage that each files in the ring is
  340. * loaded and modified while getting each FileName to scratch to make
  341. * the RingList. All files in the ring can be QUIT using @q macro.
  342. *
  343. @9      Macrobegin
  344.         prevfile unmarkblock    * Move to prevfile so file being
  345.                                 * edited is first files in RingList
  346.         EditFile "!" return     * Load/Edit RingList file !
  347.         endline begline         * If ! is already made, it has text
  348.         jtrue GETFILE:          * then GoTo GETFILE
  349.                                 *ELSE
  350.         dropanchor              *
  351.         storescrbuff "1" return * Clear scratch buffer
  352.         Begline CursorRight     * Put cursor in Col. 2 for StopFile
  353.  LOOP:                          * Main test loop
  354.         Nextfile                * Move to next files in Ring
  355.         splitline dropanchor    *
  356.         CurrentFileName         *
  357.         appendscrbuff "1" return* Append filename to scratch buffer
  358.         cut                     * Delete block
  359.         CursorLeft              * Move cursor left
  360.                                 * (need for StopFile test)
  361.         Jfalse DOIT:            * If couldn't move to left, cursor
  362.                                 * must be in Col. 1 and it's not
  363.                                 * the StopFile -- GO with DOIT
  364.                                 *ELSE
  365.                                 * Check to see if in the StopFile File
  366.         CursorLeft              * Move cursor left for StopFile Test
  367.         Jfalse RINGLIST:        * If couldn't move left again -- We
  368.                                 * ARE in the StopFile File and Need
  369.                                 * to GO to RINGLIST
  370.                                 *ELSE
  371.         CursorRight             * Restore Cursor to its previous
  372.                                 * position and GO with the DOIT
  373.  DOIT:                          * DOIT Loop
  374.         Jump LOOP:              * Return to the Main Loop
  375.  RINGLIST:                      * Get RingList into file
  376.         EditFile "!" return     * Load RingList file
  377.         getscrbuff "1" return   * Put RingList in it
  378.         delline unmarkblock     * Delete top line and unmark file
  379.  GETFILE:                       *
  380.         pause copy              * Pause and select file to edit
  381.         EditFile paste return   * and then begin editing it
  382. *
  383. * 58 bytes Mon  10-01-1990  10:56:15
  384.  
  385.  
  386.  
  387.  
  388. * ┌────────────────────────────────────────────────────────────────────┐
  389. * │@(0) Make RingList, Load all files in ring, select file to edit     │
  390. * └────────────────────────────────────────────────────────────────────┘
  391. *
  392. * Makes NEW RingList even if already made.
  393.  
  394. * Both @9 and @0 have the disadvantage that each files in the ring is
  395. * loaded and modified while getting each FileName to scratch to make
  396. * the RingList. All files in the ring can be QUIT using @q macro.
  397. *
  398. @0      Macrobegin
  399.         prevfile unmarkblock    * Move to prevfile so file being
  400.         dropanchor              * edited is first files in RingList
  401.         storescrbuff "1" return * Clear scratch buffer
  402.         Begline CursorRight     * Put cursor in Col. 2 for StopFile
  403.  LOOP:                          * Main test loop
  404.         Nextfile                * Move to next files in Ring
  405.         splitline dropanchor    *
  406.         CurrentFileName         *
  407.         appendscrbuff "1" return* Append filename to scratch buffer
  408.         cut                     * Delete block
  409.         CursorLeft              * Move cursor left
  410.                                 * (need for StopFile test)
  411.         Jfalse DOIT:            * If couldn't move to left, cursor
  412.                                 * must be in Col. 1 and it's not
  413.                                 * the StopFile -- GO with DOIT
  414.                                 *ELSE
  415.                                 * Check to see if in the StopFile File
  416.         CursorLeft              * Move cursor left for StopFile Test
  417.         Jfalse RINGLIST:        * If couldn't move left again -- We
  418.                                 * ARE in the StopFile File and Need
  419.                                 * to GO to RINGLIST
  420.                                 *ELSE
  421.         CursorRight             * Restore Cursor to its previous
  422.                                 * position and GO with the DOIT
  423.  DOIT:                          * DOIT Loop
  424.         Jump LOOP:              * Return to the Main Loop
  425.  RINGLIST:                      * Get RingList into file
  426.         EditFile "!" return     * Load RingList file
  427.         getscrbuff "1" return   * Put RingList in it
  428.         delline unmarkblock     * Delete top line and unmark file
  429.  GETFILE:                       *
  430.         pause copy              * Pause and select file to edit
  431.         Quit                    * Quit the RingList File
  432.         EditFile paste return   * and then begin editing it
  433. *
  434. * 50 bytes Mon  10-01-1990  11:02:09
  435.  
  436.  
  437.  
  438.  
  439.  
  440. *  ┌─────────────────────────────────────────────────┐
  441. *  │@(F1) Saves file with name "Mos_Day_Hour_Min.Ext"│
  442. *  └─────────────────────────────────────────────────┘
  443. *
  444. * This macro saves the current file with the name as
  445. * "Mos_Day_Hour_Min.Ext".  For example, @F1 saves this file as
  446. * 08191025.QM when date and time are Sun 08-19-1990  10:25:00.
  447. *
  448. * Insert must be ON.
  449. *
  450. * Thanks to Jim Wright for the neat idea how to condense date and time
  451. * with his macro in QE-MEM.ZIP. Like many other macro ideas from
  452. * others, they often seem so simple once we see and understand them
  453. * that we say "why didn't I think of that" - but I didn't !
  454.  
  455. @F1    Macrobegin
  456.  *************************************** TOGGLE INSERT ON*************
  457.        insertline                      * Insert test line
  458.        "a" CursorLeft "a"              * Insert "aa"
  459.        endline                         * If not at endline-insert is on
  460.  Jtrue FIN:                            * If at endline   -insert is off
  461.        toggleinsert                    * Toggle ON if off
  462.  FIN:                                  *
  463.        delline                         * Delete test line
  464.  *************************************** CONDENSE DATE & TIME *******
  465.        unmarkblock                     * Begin no marked block
  466.        insertline begline              * Insert line
  467.        insertdate inserttime           * Get date & time to condense
  468.        markline
  469.        delltword  delltword            * Delete seconds
  470.        backspace                       * Delete :
  471.        CursorLeft CursorLeft           * Keep minutes
  472.        backspace                       * Delete :
  473.        CursorLeft CursorLeft           * Keep hour
  474.        delltword  delltword            * Delete spaces and year
  475.        backspace                       * Delete -
  476.        CursorLeft CursorLeft           * Keep day
  477.        backspace                       * Delete -
  478.        CursorLeft CursorLeft           * Keep month
  479.        delltword  delltword            * Delete spaces & day name
  480.        endline                         * Go to end of condensed number
  481.        CurrentFileName                 * Get CurrentFileName
  482.        find "." return "LB" return     * Move to begin of extension  |
  483.        jtrue HASEXT:                   * If dot found, file has extn.|
  484.                                        * and go to HASEXT            |
  485.                                        *ELSE                         |
  486.        Endline "." CursorLeft          * Add ".", file has NO extn.  |
  487.  HASEXT:                               *                             |
  488.        unmarkblock                     * unmark line                 |
  489.        CursorLeft markcolumn           * Move off dot and mark it
  490.        find ":" return "b" return      * Move to :
  491.        CursorLeft deleteblock          * Del all but .ext of file name
  492.        cut                             * Get number.ext to scrap
  493.        writeblock paste return         * Save number.ext
  494. *
  495. * 63 bytes Sat  09-15-1990  09:58:56
  496. * 74 bytes Wed  02-13-1991  23:16:45 modified for files with no extn.
  497.  
  498.  
  499.  
  500.  
  501. * ┌────────────────────────────────────────────────────────┐
  502. * │@(F2) Saves file with name "CurrentFileName.Mos_Day"    │
  503. * └────────────────────────────────────────────────────────┘
  504. *
  505. * Macro saves the current file with name "CurrentFileName.Mos_Day".
  506. * For example, @F2 saves it as FILE20.214 when date and time are
  507. * Thu  02-14-1991  10:25:00. Use this macro Jan-Sept.
  508. *
  509. @F2   Macrobegin
  510.       unmarkblock                     * Begin no marked block
  511.       insertline begline              * Insert line
  512.       insertdate                      * Get date & time to condense
  513.       delltword  delltword            * Delete spaces and year
  514.       backspace                       * Delete -
  515.       CursorLeft CursorLeft           * Keep day
  516.       backspace                       * Delete -
  517.       CursorLeft                      * Keep last digit of month,
  518.       backspace                       * Delete first digit of month
  519.       backspace                       * Delete -
  520.       delltword  delltword            * Delete spaces & day name
  521.       begline                         *
  522.       CurrentFileName                 * Get CurrentFileName
  523.       delltword                       * Delete extension
  524.       cut                             * Get file name.num to scrap
  525.       writeblock paste return         * Save file name.num
  526. *
  527. * 26 bytes Wed  10-03-1990  19:24:02
  528.  
  529.  
  530.  
  531.  
  532. * * Macro saves the current file with name "CurrentFileName.Mos_Day".
  533. * * For example, @F2 saves it as FILE20.119 when date and time are
  534. * * Sun  10-19-1990  10:25:00. Use this macro Oct-Dec.
  535. * *
  536. * @F2   Macrobegin
  537. *       unmarkblock                     * Begin no marked block
  538. *       insertline begline              * Insert line
  539. *       insertdate                      * Get date & time to condense
  540. *       delltword  delltword            * Delete spaces and year
  541. *       backspace                       * Delete -
  542. *       CursorLeft CursorLeft           * Keep day
  543. *       backspace                       * Delete -
  544. *       backspace                       * Delete last digit of month
  545. *       CursorLeft                      * Keep first digit of month,
  546. *       delltword  delltword            * Delete spaces & day name
  547. *       begline                         *
  548. *       CurrentFileName                 * Get CurrentFileName
  549. *       delltword                       * Delete extension
  550. *       cut                             * Get file name.num to scrap
  551. *       writeblock paste return         * Save file name.num
  552. * *
  553. * * 25 bytes Fri  10-19-1990  12:53:19
  554.  
  555.  
  556.  
  557.  
  558. * ┌──────────────────────────────────────────────┐
  559. * │@(F3) Saves Read-Only files                   │
  560. * └──────────────────────────────────────────────┘
  561. *
  562. * This macro will save the currently loaded file if the file attribute
  563. * on the disk copy is set to Read-Only. QEdit currently will not save
  564. * files loaded as Read-Only.
  565. *
  566. * This macro is written to use either Dos ATTRIB, Gavin's ALTER, or
  567. * Norton's FA. To change from using Dos ATTRIB change the respective
  568. * lines in the macro and reconvert with QMAC.
  569. *
  570. * One word of caution: any file on the disk in the current directory
  571. * with same prefix as the loaded file will have it's read attribute
  572. * reset to read OFF regardless of the extension. Gavin's ALTER is the
  573. * fastest way to reset attributes but it also resets ALL the attributes,
  574. * including the archive bit, of ALL files in the directory with the same
  575. * prefix.
  576. *
  577. * To save a file loaded as Read-Only just press @F3:
  578.  
  579. @F3     Macrobegin
  580.         unmarkblock                     * Unmark blocks
  581.         insertline                      * Insert blank line on top
  582.         markcolumn                      *
  583.         CurrentFileName markcolumn      * Get CurrentFileName on line
  584.         storescrbuff "1" return         * Store currentfilname to buf/1
  585.         find "." return "LB" return     * Find dot back in block       |
  586.   jtrue IFEXT:                          * If dot found go to IFEXT:
  587.         endline ".*"                    * Add ".*" if name has NO ext
  588.   jump FULLEXT:                         * Go to FULLEXT
  589.   IFEXT:                                * If name has extension then..
  590.         CursorRight DelToEol "*"        * Add "*" after dot
  591.   FULLEXT:                              *
  592.         copy                            * Copy "prefix.*" to scrap
  593.         delline                         * Delline
  594.         changefilename "$" return       * Change CurrentFileName to $
  595.      dos "ATTRIB -R "                   * Clear Read Only attribute...
  596.         paste return return             *    w/ Dos    ATTRIB
  597. *    dos "ALTER "                       *
  598. *       paste "/RE" return return       *    w/ Gavin  ALTER (Fastest)
  599. *    dos "FA "                          *
  600. *       paste "/R-" return return       *    w/ Norton FA
  601.         insertline                      * Insert blank line in $
  602.         unmarkblock                     * Unmark all blocks
  603.         getscrbuff "1" return           * Get origfilename on line
  604.         copy                            * Copy to scrap
  605.         delline                         * Delline
  606.         changefilename paste return     * Change $ to origfilename
  607.         return                          * Gives OK to overlay origfile
  608.         savefile                        * Save origfile
  609. *
  610. * 78 bytes Tue  01-29-1991  19:26:21 changed "B " to "B"
  611. * 80 bytes Wed  02-13-1991  16:14:29 chnaged "B" to "LB"
  612.  
  613.  
  614.  
  615. *┌──────────────────────────────────────┐
  616. *│ @(F4) Execute Dos Commands From List │
  617. *└──────────────────────────────────────┘
  618. * To run, just press @F4 and move cursor line to the desired command
  619. * to execute. Then press <enter> to execute command and return to file
  620. * you editing. Modify DOS.LIST as you need.
  621. *
  622. * Run Syntax: [command]  <enter>
  623.  
  624. @F4  Macrobegin
  625.         unmarkblock                     *
  626.         EditFile "DOS.LST" return       * Load command list
  627.         pause                           * Select command
  628.         copy                            * Get command to scrap
  629.         quit                            * Quit command list
  630.         DOS paste return                * Execute Dos command |
  631. *
  632. * 28 bytes Sat  09-15-1990  08:56:57
  633. * 27 bytes Mon  02-11-1991  11:11:56 removed second return
  634.  
  635.  
  636.  
  637.  
  638. *┌──────────────────────────────────────────────────────────┐
  639. *│ @(F5) Execute Dos Commands From List With CurrentFileName│
  640. *└──────────────────────────────────────────────────────────┘
  641. *
  642. * To run, just press @F5 and move cursor line to the desired command
  643. * to execute. Then press <enter> to execute command. Press <enter> again
  644. * to return to file you were editing. Dos executes the command as if it
  645. * were run at the command line followed by the CurrentFileName, then
  646. * <enter>. Modify the DOS.LIST as you need.
  647.  
  648. * I recall getting this macro from the SemWare BBS but do not recall
  649. * the author. If anyone knows, please let me know so I can give proper
  650. * credit. It's quite a useful and simple macro.
  651. *
  652. * Run Syntax: [command] CurrentFileName <enter>
  653. *
  654. @F5 Macrobegin
  655.         unmarkblock                     *
  656.         EditFile "DOS.LST" return       * Load command list
  657.         pause                           * Select command
  658.         copy                            * Get command to scrap
  659.         quit                            * Quit command list
  660.         DOS paste " " CurrentFileName   * Execute command w/
  661.                                         * CurrentFileName
  662.         return                          *
  663. *
  664. * 30 bytes Sat  09-15-1990  09:24:37
  665.  
  666.  
  667. *----------------------------------------------------
  668. * Macro  @(F6)  does a DIR and ends up with a list of
  669. * filenames in conventional "8.3" format, no spaces!
  670. *---------------------------------------------------
  671. * *
  672. * * DIRLIST:  turn a DOS "DIR" command into a list of filenames.
  673. * *
  674. * * By:   Tim Farley        (For Ken Housley on RelayNet).
  675. * * Date: October 22, 1990
  676. * *
  677. *                                       (| = TH changes)
  678. @F6     Macrobegin
  679.         unmarkblock dropanchor         * | Mark file to return at end
  680.         Dos "DIR " Pause EndLine ">c:!"* | DIR list to temp file
  681.         Return Return                  * |
  682.         EditFile "c:!" Return Quit     * |Quit temp file if loaded
  683.                                        * | Change c:! to ramdrive
  684.                                        * | for faster operation
  685.         HorizontalWindow               *
  686.         EditFile Return                * |
  687.         DelLine 6                      * | Delete header info
  688.                                        * | May have to change for
  689.                                        * | DOSVER >3.3
  690.         EndFile DelLine           * Delete totals line
  691.         JFalse abort:             * Failed?  NO FILES!
  692.         BegFile                   * Back to top line, please.
  693.         GotoColumn "13" Return    * Just past filename
  694.       loopeol:
  695.         DelToEol                  * delete size/date/etc.
  696.         CursorDown                * go to next file.
  697.         JTrue loopeol:            * repeat until no more
  698.         BegFile                   * Back to top.
  699.         GotoColumn "9" Return     * Column where "." goes.
  700.       loopdot:
  701.         "." CursorLeft            * add a "." to each name
  702.         CursorDown                * try to go to next
  703.         JTrue loopdot:            * repeat until no more
  704.         BegFile
  705.         FindReplace " " Return    * replace all spaces with
  706.         DelLine Return            * NOTHING!
  707.         "NG" Return               * No prompting, just do it.
  708.       abort:
  709.        killfile                   * | Kill temp file
  710.        escape escape              * | Eliminate "changes made" message
  711.        pause closewindow          * | Pause, then close window
  712.        gotoblockbeg unmarkblock   * | Go back to file we were editing
  713. *
  714. * 100 bytes Sun  10-28-1990  11:58:10 (added TH)
  715. * 108 bytes Mon  02-11-1991  15:49:18 (added TH)
  716. * 92 bytes Thu  02-14-1991  16:40:32 (changed $$$.TMP to c:!)
  717.  
  718. * The above macro would require QEdit 2.1 and QMAC 2.1 for use.  If
  719. * you want to put it in your QCONFIG.DAT, remove all the comments
  720. * and reformat it so it fits all on one line.
  721. *
  722. * Thanks for the detailed comments about WordRight/WordLeft.
  723. *
  724. * --Tim Farley
  725. *   SemWare Technical Support
  726.  
  727.  
  728.  
  729.  
  730. * ┌─────────────────────────────────────────────────────────┐
  731. * │@(F7) READ macfile & LOAD it's txtfile from txtfile list │
  732. * └─────────────────────────────────────────────────────────┘
  733. *
  734. * @F7 enables a file to be selected for editing and it's macfile read
  735. * from a prepared list of txtfiles. The list of txtfiles (-qm.lst)
  736. * included with FILE20 is a list of the latest macros in this series,
  737. * but it can be altered to meet your needs by adding [drive:]\[path\]
  738. * both in front of each files in the list and also in the second line of
  739. * the macro, and adding or deleting any files you choose to/from this
  740. * list. The modified macro can be put in your QCONFIG.DAT file and
  741. * macros can be loaded and read while in any directory. To run, press
  742. * @F7, cursor down to the desired file, and press <enter>. Remember,
  743. * txtfiles must have the extension "QM" and the macfiles must have the
  744. * extension "MAC".
  745. *
  746. @F7 Macrobegin
  747.     EditFile "-qm.lst" return           * Edit txtfile list
  748.     pause                               * Pause to select macro to read
  749.     endline                             * Go to end of file name
  750.     backspace backspace                 * and remove it's extension
  751.     copy quit                           * Copy file name to scrap
  752.     EditFile  paste "qm"  return        * Load selected macro txtfile
  753.     macroread paste "mac" return        * and read it's macfile
  754. *
  755. * 42 bytes Thu  10-18-1990  12:23:41
  756.  
  757.  
  758.  
  759. *┌───────────────────────────────────────────────────────────┐
  760. *│ @(F8) READ macfile from macfile list, txtfile not loaded  │
  761. *└───────────────────────────────────────────────────────────┘
  762. *
  763. * @F8 enables a macfile to be selected and read from a prepared list
  764. * of macfiles. The list of macfiles (-mac.lst) included with FILE20 is
  765. * a list of the latest macros in this series, but it can be altered to
  766. * meet your needs by adding [drive:]\[path\] in front of each files in
  767. * the list and also in the second line of the macro, and adding or
  768. * deleting any files you choose to/from this list. The modified macro
  769. * can be put in your QCONFIG.DAT file and macros can be read while in
  770. * any directory. To run, press @F8, cursor down to the desired file,
  771. * and press <enter>. Remember, macfiles must have the extension "MAC".
  772. *
  773. @F8 Macrobegin
  774.     EditFile "-mac.lst" return          * Edit macfile list
  775.     pause                               * Pause to select macro to read
  776.     endline                             * Go to end of macfile name
  777.     backspace backspace backspace       * and remove it's extension
  778.     copy quit                           * Copy macro name to scrap
  779.     macroread paste "mac" return        * Read it's macfile only
  780. *
  781. * 38 bytes Thu  10-18-1990  12:23:50
  782.  
  783.  
  784.  
  785.  
  786. *------------------------------------------------------------
  787. * #(F3_) Spell check current file WITH backup with ShareSpell,
  788. *        QCONFIG.DAT backups ON or OFF, SS makes a backup file.
  789. *------------------------------------------------------------
  790. *
  791. #F3 Macrobegin                              *
  792.     SaveFile                                * Save file
  793.     Dos "SS " CurrentFileName Return Return * Spell Check
  794.     EditFile CurrentFileName Return         * Set EditFile prompt
  795.     NewFile Return                          * Load Spell checked file
  796. *
  797. * 20 bytes Wed  02-13-1991  12:32:29
  798.  
  799.  
  800.  
  801.  
  802. *-----------------------------------------------------------------
  803. * #(F4_) Spell check WITHOUT backup, QCONFIG.DAT backups ON or OFF
  804. *-----------------------------------------------------------------
  805. * This macro does not save a backup file no matter how QCONFIG.DAT is
  806. * configured for backups. If a beep is heard, the file being spell
  807. * checked does not have an extension (no dot was found).
  808. *
  809. #F4 Macrobegin
  810.     Unmarkblock Insertline Begline      * Insert temp line with
  811.     Dropanchor CurrentFileName          * CurrentFileName marked
  812.     Find "." Return "LB" Return         * Find dot backwards in name
  813.         jtrue HASEXT:                   * If dot found, file has extn.
  814.                                         * and go to HASEXT
  815.                                         *ELSE
  816.         Endline "." CursorLeft          * Add ".", file has NO extn.
  817.  HASEXT:                                *
  818.     CursorRight DelToEol "bak"          *THEN add "bak" after dot
  819.     Cut Savefile                        * Cut name.bak to scrap/save it
  820.     DOS "SS " CurrentFileName Return Return * ShareSpell spell check
  821.     DOS "DEL " Paste Return Return      * Delete name.bak
  822.     EditFile CurrentFileName Return     * Set EditFile prompt
  823.     NewFile Return                      * Load spell checked file
  824. *
  825. * 62 bytes Thu  02-14-1991  12:19:16
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834. *---------------------------------------------------------
  835. * #(F5_) Saves file WITHOUT backup, QCONFIG.DAT backups ON
  836. *---------------------------------------------------------
  837. * Saves files without making a backup file if QCONFIG.DAT
  838. * is configured "Yes" to "Do you want backups saved?".
  839. *
  840. #F5 Macrobegin Togglebakups SaveFile Togglebakups
  841. *
  842. * 7 bytes Tue  02-12-1991  03:39:44
  843.  
  844.  
  845.  
  846.  
  847. *----------------------------------------------------------------
  848. * #(F6_) Saves file WITHOUT backup, QCONFIG.DAT backups ON or OFF
  849. *----------------------------------------------------------------
  850. * This is an alternate version of #F5 which does not save a backup
  851. * file no matter how QCONFIG.DAT is configured for backups. If a
  852. * beep is heard, the file being saved does not have an extension
  853. * (no dot was found).
  854. *
  855. #F6 Macrobegin
  856.     Unmarkblock Insertline Begline      * Insert temp line with
  857.     Dropanchor CurrentFileName          * CurrentFileName marked
  858.     Find "." Return "LB" Return         * Find dot backwards
  859.         jtrue HASEXT:                   * If dot found, file has extn.
  860.                                         * and go to HASEXT
  861.                                         *ELSE
  862.         Endline "." CursorLeft          * Add ".", file has NO extn.
  863.  HASEXT:                                *
  864.     CursorRight DelToEol "bak"          *THEN add "bak" after dot
  865.     Cut Savefile                        * Cut name.bak to scrap/save file
  866.     DOS "del " Paste Return Return      * Delete name.bak
  867. *
  868. * 47 bytes Thu  02-14-1991  12:11:50
  869.  
  870. * Here's an alternate version of #F6 that saves a file without a
  871. * backup no matter how QCONFFIG.DAT is configured. Be careful that no
  872. * line feed or carriage return characters are in the file or the saved
  873. * file will be formatted with these characters removed.
  874. *
  875. * #F6 Macrobegin                        *
  876. *     unmarkblock killfile              * Kill disk copy so writeblock
  877. *                                       * works without prompts
  878. *     writeblock currentfilename return * Save file as block
  879. *
  880. * 8 bytes Thu  02-14-1991  12:28:01
  881.  
  882.  
  883.  
  884.  
  885. *--------------------------------------
  886. * #(F7_) Deletes CurrentFileName Backup
  887. *--------------------------------------
  888. *
  889. #F7 Macrobegin
  890.     Unmarkblock Insertline Begline      * Insert temp line with
  891.     Dropanchor CurrentFileName          * CurrentFileName marked
  892.     Find "." Return "LB" Return         * Find dot backwards
  893.         jtrue HASEXT:                   * If dot found, file has extn.
  894.                                         * and go to HASEXT
  895.                                         *ELSE
  896.         Endline "." CursorLeft          * Add ".", file has NO extn.
  897.  HASEXT:                                *
  898.     CursorRight DelToEol "bak"          *THEN add "bak" after dot
  899.     Cut                                 * Cut name.bak to scrap
  900.     DOS "DEL " Paste Return Return      * Delete name.bak
  901. *   DOS "DX " Paste "//DEL"             * Alternate verify delete
  902. *   Return Return                       * with Directory Extender DX
  903. *
  904. * 46 bytes Wed  02-13-1991  16:15:49
  905.  
  906.  
  907.  
  908. *----------------------------------
  909. * #(F8_) Edit CurrentFileName Backup
  910. *----------------------------------
  911. *
  912. #F8 Macrobegin
  913.     Unmarkblock Insertline Begline      * Insert temp line with
  914.     Dropanchor CurrentFileName          * CurrentFileName marked
  915.     Find "." Return "LB" Return         * Find dot backwards
  916.         jtrue HASEXT:                   * If dot found, file has extn.
  917.                                         * and go to HASEXT
  918.                                         *ELSE
  919.         Endline "." CursorLeft          * Add ".", file has NO extn.
  920.  HASEXT:                                *
  921.     CursorRight DelToEol "bak"          *THEN add "bak" after dot
  922.     Cut                                 * Cut name.bak to scrap
  923.     EditFile Paste Return               * Load name.bak
  924. *
  925. * 37 bytes Wed  02-13-1991  16:16:03
  926.  
  927.  
  928.  
  929. *┌───────────────────────────────────────────────────────────────────┐
  930. *│@(h) Finds first word on cursor line marked in document below      │
  931. *└───────────────────────────────────────────────────────────────────┘
  932. *
  933. *        @h macro has 2 steps:
  934. *
  935. *        1. Press @ and h at the same time. An ! shows at the
  936. *        end of the top line. Cursor down to desired line in Index.
  937. *
  938. *        2. Press Enter. The macro first erases the !, and
  939. *        then finds the first word on the cursor line in the document
  940. *        below marked with (...).
  941. *
  942. * See BOOK15.QM for more details.
  943. *
  944. @h Macrobegin
  945.         unmarkblock                     * Unmark any marked blocks
  946.         begfile endline                 * Go to file begin endline
  947.         "!"                             * Put ! at endline
  948.         begline
  949.         find "!" return return begline  * Highlight !
  950.         pause                           * Pause for Index selection
  951.         wordright markword              * Mark first word on line
  952.         copy                            * Copy word to scrap buffer
  953.         begfile                         * Begfile
  954.         find "!" return return delch    * Find & delete !
  955.         endpara                         * Go to end of Index
  956.         makectrofscreen                 * Cursor line center of window
  957.         find "(" paste ")"
  958.         return "I" return               * Find first marked word in doc
  959.  jfalse NOMARK:
  960.         begline                         * If mark found go to begline
  961.  jump END:
  962.  NOMARK:
  963.         begfile                         * If no mark found go to begfile
  964.  END:
  965. *
  966. * 47 bytes Fri  09-14-1990  14:06:26
  967.  
  968.  
  969.  
  970. *┌──────────────────────────────────┐
  971. *│@(q) QUITs all Files in Ring      │
  972. *└──────────────────────────────────┘
  973. *
  974. @q      Macrobegin
  975.     LOOP:
  976.         quit
  977.         jump LOOP:
  978. *
  979. * 8 bytes Sat  09-29-1990  00:03:46
  980.  
  981.  
  982.  
  983. *┌────────────────────────────────────────────────────────────────┐
  984. *│@(f) Executes programs requiring filename without full pathname │
  985. *└────────────────────────────────────────────────────────────────┘
  986. *
  987. @f  Macrobegin
  988.     Unmarkblock Insertline          * Insert temp line
  989.     CurrentFileName                 * with CurrentFileName
  990.     MarkCharacter                   * Begin mark
  991.     Find "\" Return "B" Return      * Find \ backwards
  992.     CursorRight Cut                 * Cut filename to scrap
  993.     Delline                         * Delete temp line
  994.     Dos "dir " Paste Return         * Execute "dir"
  995.                                    ** Change "dir " to "program " name
  996. *
  997. * 29 bytes Wed  01-23-1991  20:59:24
  998.  
  999.  
  1000.  
  1001.  
  1002. * (Version) History:
  1003. *
  1004. *  1.0 - Initial version named SORT10.ZIP
  1005. *  1.1 - changed and shortened Alt-f3 to keep extraneous files
  1006. *        from ring
  1007. *      - Changed file names from SORTxx.xxx to FILExx.xxx.
  1008. *  1.2 - DX Directory Extended not included to save download time.
  1009. *  1.2a- Changed other file names in series, this is an update.
  1010. *  1.3 - Added @4 to load files from PickList, wild cards OK.
  1011. *      - Changed j:$ to c:! in macros and batch file.
  1012. *      - Changed .QL and .LST files.
  1013. *      - Changed key assignments from alternate_functions
  1014. *        to alternate_numbers.
  1015. *      - All macros shortened.
  1016. *  1.4 - FILE-DX.BAT was not saving "echo .." initialization; corrected.
  1017. *      - Modified macros @1-4 so Insert does NOT have to be ON.
  1018. *      - Added AltWordSet to @1-4 to get all files.
  1019. *      - Removed need to use scratch buffers in @3.
  1020. *      - Added @5 to LOAD a file whose name is at the cursor.
  1021. *      - Added @6 to execute Dos Commands From List.
  1022. *      - Added @7 to EXECUTE DOS commands from List
  1023. *        with CurrentFileName.
  1024. *      - Added @8 to read macfile of txtfile that is loaded.
  1025. *      - Added ^3 to save Read-Only files.
  1026. *      - Added ^1 and ^2 to save files with date-time name.
  1027. *      - Modified @1-4 and batch files to exclude directories in file
  1028. *        list and PickList.
  1029. *      - Removed check to quit c:! if already loaded in @1-4.
  1030. *      - Changed @4 to use only PICK.BAT.
  1031. *  1.5 - Added @9 to select file to edit from RingList
  1032. *      - Added @0 to select file to edit from RingList if new files have
  1033. *        been loaded since making last RingList
  1034. *      - Added @h to FIND items or macros in Index.
  1035. *      - Added @q to QUIT all files in ring.
  1036. *  1.6 - Added @6 to re-LOAD current file from disk copy.
  1037. *      - Modified @9 and @0 to be faster and shorter.
  1038. *      - Modified @F2 for correct extension Oct-Dec.
  1039. *      - Changed @F1 thru @F5 key assignments.
  1040. *  1.7 - Added @F6 to turn "DIR" command into a "8.3" list of filenames,
  1041. *        written by  T. Farley of SemWare.
  1042. *      - Added @F7 and @F8 to read and load txtfiles and macfiles from
  1043. *        a prepared list of active txtfiles and macfiles.
  1044. *      - Modified @F2 for Oct-Dec and added alternate version
  1045. *        for Jan-Sept.
  1046. *      - DOS.LST was inadvertantly left out of versions since 1.4.
  1047. *        It is now included.
  1048. *  1.8 - Modified @F6 for DOS Ver 3.3, other Dos versions not tested.
  1049. *      - Modified documentation and added START.BAT.
  1050. *      - Added @z to load all files in "Ring" buffer.
  1051. *      - Modified @F2 for Jan-Sep and added alternate version
  1052. *        for Oct-Dec.
  1053. *  1.9 - Added @F to execute programs requiring filename without full
  1054. *        path name.
  1055. *      - Corrected @h Index Use instructions.
  1056. *      - Shortened @F3 2 bytes.
  1057. *  2.0 - Added #F3 & #F4 to spell check with ShareSpell.
  1058. *      - Added #F5 & #F6 to save files without making backups.
  1059. *      - Added #F7 & #F8 to delete and edit CurrentFileName Backup.
  1060. *      - Modified @F1 to handle file names with no extension.
  1061. *      - Changed @F3 in "B" to "LB" to search for dot only in block.
  1062. *      - From @F4 removed second return to not pause after executing.
  1063. *        DOS command.
  1064. *      - Modified @F6 to handle multiple runs correctly.
  1065. *      - Changed $$$.TMP to C:! in @F6, shortened 16 bytes.
  1066. *      - Change @z key to @7.
  1067.  
  1068. * Tom Hogshead  Thu  02-14-1991
  1069.